import 'package:flutter/material.dart';

class MinePageIndecatorWidget extends StatelessWidget {
  
  final int length;
  final Color color;
  final Color selectedColor;
  final double indicatorSize;
  final int selectIndex;
  const MinePageIndecatorWidget({
    Key key, 
    this.length = 10, 
    this.color, 
    this.selectedColor,
    this.indicatorSize = 8,
    this.selectIndex,
  }) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Row(
      mainAxisAlignment: MainAxisAlignment.spaceAround,
      mainAxisSize: MainAxisSize.min,
      children: List.generate(length, (index){
        return Container(
          margin: const EdgeInsets.symmetric(horizontal: 5),
          decoration: BoxDecoration(
            shape: BoxShape.circle,
            color: selectIndex == index ? selectedColor : color
          ),
          width: indicatorSize,
          height: indicatorSize
        );
      }),
    );
  }
}